import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main, sim_items
from util import *

class Potion(sim_items.Potion):
    def __init__(self):
        sim_items.Potion.__init__(self, "healing", "!",
                ('life', 'more'),
                idDescription = "This viscous potion tastes like a "\
                    "combination of anise, ammonia, and overripe bananas. No "\
                    "one would willingly drink such a foul concoction if it "\
                    "weren't for the fact it instantly closes gaping wounds.")

    def quaff(self, quaffer):
        if quaffer['hp'] < quaffer['maxHP']:
            main.schedule(sim.Event('increase stat', main.schedule.time, (quaffer,
                'hp', random.randint(20,40)), dests=[quaffer]))
            main.transient('You feel healthier!')
            quaffer.identify(self)
        else:
            main.transient('Nothing seems to happen.')

#========================================
thingClass = Potion

